# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=dash
pkgver=0.5.11.1
pkgrel=0
pkgdesc="Small and fast POSIX-compliant shell"
url="http://gondor.apana.org.au/~herbert/dash/"
arch="all"
license="GPL-2.0-or-later"
# needs 'nl' utility from coreutils
makedepends="coreutils"
install="$pkgname.post-install $pkgname.post-upgrade $pkgname.pre-deinstall"
subpackages="$pkgname-doc"
source="http://gondor.apana.org.au/~herbert/dash/files/dash-$pkgver.tar.gz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	./src/dash -c 'echo ok'
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="6403ac793c87c9101bd5f3b2df74200ce1a992d0c432aa79375d4479b87c83279f303239af5080728c8a64ef4520e39fe8f0f1e037a0a38ffce1e4dd057d9c72  dash-0.5.11.1.tar.gz"
